package com.jobinn.DAO.impl;

import javax.annotation.Resource;

import org.hibernate.SessionFactory;
import org.springframework.transaction.annotation.Transactional;

import com.jobinn.DAO.JobInfoDAO;
import com.jobinn.JDOBean.JobInfo;


@Transactional
public class JobInfoDAOImpl implements JobInfoDAO {
	@Resource private SessionFactory sessionFactory; 
	
	/* (non-Javadoc)
	 * @see com.jobinn.DAO.impl.JobInfoDAO#save(com.jobinn.JDOBean.JobInfo)
	 */
	public void save(JobInfo jobInfo) {
		sessionFactory.getCurrentSession().persist(jobInfo);
	}
	
	/* (non-Javadoc)
	 * @see com.jobinn.DAO.impl.JobInfoDAO#update(com.jobinn.JDOBean.JobInfo)
	 */
	public void update(JobInfo jobInfo) {
		sessionFactory.getCurrentSession().merge(jobInfo);	
	}
}
